package com.java.zhuiyun.api.pc_login.mapper;

import com.java.zhuiyun.api.front_desk_user.entity.FrontDeskUser;
import com.java.zhuiyun.api.pc_login.entity.SysUserDto;
import com.java.zhuiyun.api.sys_user.entity.SysUser;
import com.java.zhuiyun.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

/**
 * @InterfaceName PcLoginMapper
 * @Description TODO
 * @Author WX
 * @Date 2023/8/23 15:23
 **/
@Mapper
public interface PcLoginMapper extends BaseMapper<FrontDeskUser> {
    /*
     * @Author WX
     * @Description 登录查询
     * @Date 2023/8/31 10:24
     * @Return
     * @param null
     */
    @Select("SELECT * FROM front_desk_user WHERE front_desk_account = #{frontDeskAccount} and front_desk_password = #{frontDeskPassword}")
    SysUserDto login(FrontDeskUser FrontDeskUser);

    @Select("SELECT * from front_desk_user WHERE front_desk_phone=#{phone}")
    FrontDeskUser selectByPhone(String phone);

    @Select("SELECT * from front_desk_user WHERE front_desk_email=#{email}")
    FrontDeskUser selectByEmail(String email);
}
